<?php if ($object['type'] == "discussion"): ?>
	<div class="comment<?php if ($object['unread']): ?> ounread<?php endif; ?> original" id="originalcomment">
<?php else: ?>
	<div class="comment<?php if ($object['unread']): ?> unread<?php endif; ?> <?php echo cycle(array('row1','row2')) ?>" id="comment<?php echo $object['object_id'] ?>">
<?php endif; ?>

<?php if (!$skipdetails): ?>
	<p class="commentdetails">
	
	<?php if (checkPermission($object, "edit")): ?>
		 <a href="<?php echo Gene::makeLink($object) ?>/edit">Edit</a>. 
	<?php endif; ?>
	<?php if ($object['type'] == "discussion"): ?>
		<?php if (checkPermission($object, "moderate") && hasPermission("namespaces.object.remove.discussion")): ?>
			 <a href="<?php echo Gene::makeLink($object) ?>/edit/remove">Delete Discussion</a>.
		<?php endif; ?>
	<?php else: ?>
		<?php if (checkPermission($object, "moderate") && hasPermission("namespaces.object.remove.discussioncomment")): ?>
			 <a href="<?php echo Gene::makeLink($object) ?>/edit/remove">Delete</a>.
		<?php endif; ?>
	<?php endif; ?>
	<?php if (checkPermission($object, "revisions")): ?>
		<a href="<?php echo Gene::makeLink($object) ?>/revisions">History</a>.
	<?php endif; ?>
	<?php if ($loggedin): ?>
		<a href="<?php echo Gene::makeLink($object) ?>/view/report">Report</a>.
	<?php endif; ?>
	<?php if (hasPermission("namespaces.object.create.discussioncomment")): ?>
		<?php if ($object['type'] == "discussion" && checkPermission($object, "write")): ?>
			<a href="<?php echo addArguments(Gene::makeLink($object).'/new/discussioncomment', array('quote' => $object['object_id'])) ?>" class="quotecomment">Quote</a>.
		<?php elseif ($object['type'] == "discussioncomment" && checkPermission($parent, "write")): ?>
			<a href="<?php echo addArguments(Gene::makeLink($parent).'/new/discussioncomment', array('quote' => $object['object_id'])) ?>" class="quotecomment">Quote</a>.
		<?php endif; ?>
	<?php endif; ?>
	</p>
<?php endif; ?>

<p class="commentinfo">
<?php if ($object['owner_id']): ?>
	<a href="<?php echo Gene::makeLink(Gene::userId($object['name'])) ?>" class="commentuser" style="font-weight: bold;"><?php _e($object['name']) ?></a>
<?php else: ?>
	<?php if ($object['guest_url']): ?>
		<a href="<?php echo $object['guest_url'] ?>" class="commentuser">"<?php echo $object['guest_name'] ?>"</a>
	<?php else: ?>
		<span class="commentuser">"<?php echo $object['guest_name'] ?>"</span>
	<?php endif; ?>
	
	<?php if (hasPermission("namespaces.user.guest_info")): ?>
		<a href="<?php echo addArguments(Gene::makeLink(Gene::specialId('Guest')), array('object' => $object['object_id'])) ?>" class="commentuser">(Guest)</a>
	<?php else: ?>
		(Guest)
	<?php endif; ?>
<?php endif; ?> wrote at <a href="<?php echo Gene::makeLink($object) ?>"><?php _e(makedate($object['t_create'])) ?></a>:</p>

<div class="commentcontent">

<div class="commentmain"><?php echo $object['content'] ?></div>

<?php if ($object['t_modify']): ?>
	<p><em>Last modified at <?php echo makedate($object['t_modify']) ?>.</em></p>
<?php endif; ?>

</div>

</div>